<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">

        <input type="button" v-on:click="green" value="点击一下下">

        <input type="button" v-on:click="greet('lisa')" value="点一下下">
        <input type="button" v-on:click="models('good nice')" value="点一下下">
        <input type="button" v-on:click.self.prevent="lisa('土笨笨')" value="点一下下0">

        <input type="button" v-on:click.once="say('婉婷 = good nice + 土笨笨.', $event)" value="点一下下">
    
        <select v-model = "selected" @change="seChange"> 
            <option value="1">土笨笨</option>
            <option value="2">good nice</option>
            <option value="3">===</option>
        </select>

        <div @click.self="Blue">
            <input type="button" @click="nice" value="点一下下2">
        </div>

        <button v-on:click.exact="lisa">土笨笨</button>

        <button v-on:click.ctrl.exact="lisa">A</button>

        <button v-on:click.ctrl="lisa">A</button>

    </div>

    <!-- <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>
    <script>
        var app = new Vue({
            el: '#app',
            data: {
                selected:[],

                name: 'good nice 土笨笨'
            },
            
            methods: {
                green: function (event) {
                    
                    alert('wanting ' + this.name + '!')
                    
                    if (event) {
                        alert(event.target.tagName)
                    }
                },
                greet:function(message){
                    alert(message)
                },
                models:function(message){
                    alert(message)
                },
                lisa:function(message){
                    alert(message)
                },
                say:function(message,event){
                    if(event){
                        // event.preventDefault()
                        event.stopPropagation()
                    }
                    alert(message)
                },
                seChange:function(){
                    console.log(this.selected);
                },
                nice:function(id,event){
                    console.log(id);
                    console.log(event);
                },
                Blue:function(){
                    console.log('lllldsh');
                }
            }
        })
    </script>

</body>

</html>